<%#
# Copyright 2009 Michal Trzcinka
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# 
# http://www.apache.org/licenses/LICENSE-2.0
# 
# Unless required by applicable law or agreed to in writing, software distributed
# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
# CONDITIONS OF ANY KIND, either express or implied. See the License for the
# specific language governing permissions and limitations under the License.
# 
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
  "http://www.w3.org/TR/html4/strict.dtd">
<html>
  <head>
    <title><%= t 'title'  %> </title>

    <!-- Individual YUI CSS files -->
    <link rel="stylesheet" type="text/css" href="/yui/reset-fonts-grids/reset-fonts-grids.css">
    <link rel="stylesheet" type="text/css" href="/yui/container/assets/skins/sam/container.css">
    <link rel="stylesheet" type="text/css" href="/yui/menu/assets/skins/sam/menu.css">
    <link rel="stylesheet" type="text/css" href="/yui/button/assets/skins/sam/button.css">
    <link rel="stylesheet" type="text/css" href="/yui/slider/assets/skins/sam/slider.css">
    <link rel="stylesheet" type="text/css" href="/yui/colorpicker/assets/skins/sam/colorpicker.css">
    <link rel="stylesheet" type="text/css" href="/yui/editor/assets/skins/sam/editor.css">
    <link rel="stylesheet" type="text/css" href="/yui/logger/assets/skins/sam/logger.css">
    <%= stylesheet_link_tag 'style' %>

    <script type="text/javascript" src="/javascripts/locales.js"></script>

    <!-- Individual YUI JS files -->
    <script type="text/javascript" src="/yui/yahoo/yahoo.js"></script>
    <script type="text/javascript" src="/yui/event/event.js"></script>
    <script type="text/javascript" src="/yui/connection/connection.js"></script>
    <script type="text/javascript" src="/yui/dom/dom.js"></script>
    <script type="text/javascript" src="/yui/dragdrop/dragdrop.js"></script>
    <script type="text/javascript" src="/yui/animation/animation.js"></script>
    <script type="text/javascript" src="/yui/container/container.js"></script>
    <script type="text/javascript" src="/yui/event-mouseenter/event-mouseenter.js"></script>
    <script type="text/javascript" src="/yui/selector/selector.js"></script>
    <script type="text/javascript" src="/yui/event-delegate/event-delegate.js"></script>
    <script type="text/javascript" src="/yui/element/element.js"></script>
    <script type="text/javascript" src="/yui/menu/menu.js"></script>
    <script type="text/javascript" src="/yui/button/button.js"></script>
    <script type="text/javascript" src="/yui/slider/slider.js"></script>
    <script type="text/javascript" src="/yui/colorpicker/colorpicker.js"></script>
    <script type="text/javascript" src="/yui/editor/editor.js"></script>
    <script type="text/javascript" src="/yui/get/get.js"></script>
    <script type="text/javascript" src="/yui/json/json.js"></script>
    <script type="text/javascript" src="/yui/logger/logger.js"></script>

    <%= javascript_include_tag 'prototype' %>
    <%= javascript_include_tag 'application' %>
    <%= javascript_include_tag 'vcard/utils' %>
    <%= javascript_include_tag 'vcard/prototypes' %>
    <%= javascript_include_tag 'vcard/constants' %>
    <%= javascript_include_tag 'vcard/config' %>
    <%= javascript_include_tag 'vcard/model' %>

    <%= javascript_include_tag 'vcard/view/cells' %>
    <%= javascript_include_tag 'vcard/view/item_editor' %>
    <%= javascript_include_tag 'vcard/view/dimensions_editor' %>
    <%= javascript_include_tag 'vcard/view/item' %>
    <%= javascript_include_tag 'vcard/view/cell' %>
    <%= javascript_include_tag 'vcard/view/context_menu' %>
    <%= javascript_include_tag 'vcard/view/link_painter' %>
    <%= javascript_include_tag 'vcard/view/view' %>

    <%= javascript_include_tag 'vcard/vcard' %>


    <script type="text/javascript">

      YAHOO.util.Event.throwErrors = true;

      YAHOO.util.Event.on(window, "load", loggerInit);

      function loggerInit() {
        YAHOO.widget.Logger.enableBrowserConsole();
      }

    </script>

  </head>
  <body class="yui-skin-sam">

    <div id="doc2" class="yui-t7">
      <div id="hd">
        <div>
          <% if current_user.account_type == 'operator' %>
            <%= link_to t(:create_new_grid, :scope => 'top.links'), :controller => 'grids', :action => 'new' %> |
          <% end %>
          <%= link_to t(:grids_list, :scope => 'top.links'), :controller => 'grids'%>
          | <%= link_to t(:logout, :scope => 'top.links'), :controller => 'login', :action => 'logout' %>
        </div>
        <div>
          <%= t 'logged_in_as', :scope => 'top.text', :user => current_user.login %>
        </div>
        <% if flash[:notice] %>
          <div style="color: red">
            <%= flash[:notice] %>
          </div>
        <% end  %>

      </div>

      <div id="bd">
        <div class="yui-g">
          <%= yield %>
        </div>
      </div>

      <div id="ft">
<%#*<p>Footer</p>%>
      </div>
    </div>


  </body>
</html>